/******************************************************************************
 * Copyright (C) 2017 Chengdu Dlhd information industry co. LTD.
 * All Rights Reserved.
 * 本软件为成都顶联互动信息产业有限公司开发研制。未经本公司正式书面同意，其他任何个人、团体不得使用、复制、修改或发布本软件.
 *****************************************************************************/
package net.dgg.dggcloud.service.jrcrm.service.call;

import com.alibaba.fastjson.JSONObject;
import net.dgg.dggcloud.core.cache.CacheManager;
import net.dgg.dggcloud.core.constants.Constants;
import net.dgg.dggcloud.core.json.JsonUtil;
import net.dgg.dggcloud.core.util.ConfigLoader;
import net.dgg.dggcloud.core.util.DateUtil;
import net.dgg.dggcloud.core.util.StringUtils;
import net.dgg.dggcloud.service.common.base.service.BaseService;
import net.dgg.dggcloud.service.common.exception.BizException;
import net.dgg.dggcloud.service.common.pagination.PageData;
import net.dgg.dggcloud.service.entity.user.User;
import net.dgg.dggcloud.service.jrcrm.constant.BusinessConstant;
import net.dgg.dggcloud.service.jrcrm.constant.CustomerRecordConstant;
import net.dgg.dggcloud.service.jrcrm.dao.business.BusinessDao;
import net.dgg.dggcloud.service.jrcrm.dao.customer.SoundCommentDao;
import net.dgg.dggcloud.service.jrcrm.entity.business.AntiInvalid;
import net.dgg.dggcloud.service.jrcrm.entity.business.Business;
import net.dgg.dggcloud.service.jrcrm.entity.business.BusinessAllotCount;
import net.dgg.dggcloud.service.jrcrm.entity.cms.ChannelCost;
import net.dgg.dggcloud.service.jrcrm.entity.cms.TreeBook;
import net.dgg.dggcloud.service.jrcrm.entity.cms.UserSetting;
import net.dgg.dggcloud.service.jrcrm.entity.customer.*;
import net.dgg.dggcloud.service.jrcrm.service.business.BusinessAllotCountService;
import net.dgg.dggcloud.service.jrcrm.service.cms.*;
import net.dgg.dggcloud.service.jrcrm.service.customer.WidelyResourceService;
import net.dgg.dggcloud.service.jrcrm.service.customer.api.ContactApiService;
import net.dgg.dggcloud.service.jrcrm.service.customer.api.CustomerApiService;
import net.dgg.dggcloud.service.jrcrm.utils.BizExceptionUtil;
import net.dgg.dggcloud.service.jrcrm.utils.HttpRequest;
import net.dgg.dggcloud.service.service.RoleService;
import net.dgg.dggcloud.service.service.organization.OrganizationService;
import net.dgg.dggcloud.service.service.user.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;


/**
 * @ClassName 〈SoundCommentService>
 * @Description
 * @Author 罗金
 * @Date 2017/11/23 11:42
 */
@Service
public class SoundCommentService extends BaseService {
    @Autowired
    private SoundCommentDao soundCommentDao;
    /**
     * 记录条数</br>
     *
     * @param map </br>
     * @return 记录 </br>
     */
    public Integer countSoundCommentByMap(Map map) {
        return soundCommentDao.querySoundCommentListCountByParams(map);
    }

    /**
     * List<Map></br>
     *
     * @param map</br>
     * @return 集合</br>
     */
    public List<Map> listSoundCommentByMap(Map map) {
        return soundCommentDao.querySoundCommentListByParams(map);
    }

    public void saveOrUpdateSoundComment(SoundComment soundComment) {
        repository.saveOrUpdate(soundComment);
    }

    public SoundComment getSoundCommentById(Long scId) {
        return repository.get(SoundComment.class,scId);
    }

}
